package com.linkzd.iot.service.Impl;

import com.linkzd.iot.mapper.DeviceFeedbackMapper;
import com.linkzd.iot.domain.DeviceFeedbackModel;
import com.linkzd.iot.service.IDeviceFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: Wangym
 * @Date: 2024/5/25 23:30
 * @Description:
 */
@Service
public class DeviceFeedbackServiceImpl implements IDeviceFeedbackService {

    @Autowired
    private DeviceFeedbackMapper deviceFeedbackMapper;
    /**
     * 查询设备信息列表
     *
     * @param code 设备信息
     * @return 设备信息
     */
    @Override
    public List<DeviceFeedbackModel> selectDeviceFeedbackList(String code)
    {
        List<DeviceFeedbackModel> deviceFeedbackModelList = deviceFeedbackMapper.selectDeviceFeedbackModelList(code);
        return deviceFeedbackModelList;
    }

    /**
     * 新增设备反馈信息
     *
     * @param deviceFeedbackModel 设备信息
     * @return 结果
     */
    @Override
    public int insertDeviceFeedback(DeviceFeedbackModel deviceFeedbackModel) {
        return deviceFeedbackMapper.insertDeviceFeedbackModel(deviceFeedbackModel);
    }

    /**
     * 修改设备反馈信息
     *
     * @param code 设备信息
     * @return 结果
     */
    @Override
    public int updateDeviceFeedback(String code) {
        return deviceFeedbackMapper.updateDeviceFeedbackModel(code);
    }
}
